home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1084 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.3 KB

  1. From: Bob Friesenhahn <bfriesen@cyberramp.net>
  2. Message-ID: <3171C842.64BB@cyberramp.net>
  3. X-Original-Date: Sun, 14 Apr 1996 22:53:38 -0500
  4. Path: in1.uu.net!bounce-back
  5. Date: 15 Apr 96 07:20:36 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: Use of standard exception classes
  9. Organization: Simple Systems
  10. References: <9604121530.AA08606@sun132.spd.dsccc.com>
  11. X-Mailer: Mozilla 2.01 (X11; I; SunOS 5.5 sun4m)
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMXH45eEDnX0m9pzZAQFXVAF8DhQzvoP7Nv5+oRtfnSnIwU7y3cGzvGjg
  14.     aEBeCcrVz4CqgxT1XQFmsZXeFDDV0RS5
  15.     =rgQT
  16.  
  17. Kevin Cline wrote:
  18.  
  19. > Can someone on the committee indicate whether it was the committee's
  20. > intention for the standard exception class hierarchy to be used in
  21. > general C++ programming, or whether the intention was for the standard
  22. > exception class hierarchy to be reserved to the Standard C++ library?
  23. > Another developer on our team has asked
  24. >   How can we be sure that ANSI C++ library callbacks work
  25. >   correctly in the face of exceptions?  What if ANSI C++
  26. >   library code catches *our* exception?
  27.  
  28. A further consideration is that often it is valuable to know what
  29. body of code generated an exception.  If all exeptions are derived
  30. from the same base class, then it will be impossible to tell if
  31. an exception occurred in standard library code, user code, or some
  32. third party library. An additional level of derivation could be
  33. used to satisfy this requirement, but since the standard exception
  34. classes have already been defined, there is no satisfactory place
  35. to insert the additional derivation.
  36.  
  37. By using a different base class for each seperately maintained body
  38. of code, it will be possible to provide handlers for each code body
  39. with the additional maintenance expense of maintaining the additional
  40. catch blocks.
  41.  
  42. Bob
  43. -- 
  44. Bob Friesenhahn
  45. bfriesen@cyberramp.net (Home)
  46. thefuzz@bix.com        (On BIX)
  47. http://www.cyberramp.net/~bfriesen
  48. ---
  49. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  50. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  51. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  52. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  53. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  54.